package com.tuling.base;

public class Base {


    private String baseName = "base";
    private int baseInt = 12;
    private Integer baseIntInteger = 122;

    static {
//        System.out.println("1111111");
    }

    public Base() {
        System.out.println("父类开始====");

//        callName1();
        System.out.println("父类====");
    }

    public void callName() {
        System.out.println("父类的普方法类====");
        System.out.println(baseName);
        System.out.println("父类的普方法类====yyxxxx" + baseInt);
        System.out.println("父类的普方法类===yyyyyxxxxx=" + baseIntInteger);
    }

    public void callName1() {
        System.out.println("父类的普方法类====");
        System.out.println(baseName);
        System.out.println("父类的普方法类====xxxx" + baseInt);
        System.out.println("父类的普方法类===xxxxx=" + baseIntInteger);
    }

    static class Sub extends Base {
        private String baseName = "sub";

        public Sub() {
//            callName();
        }

        public void callName() {
            System.out.println("子类的普通方法====");
            System.out.println(baseName);
        }
    }

    public static void main(String[] args) {
        Base b = new Sub();
        System.out.println("xxxxxx");
        b.callName();
    }
}
